package com.gnerv.battle.boot.framework.core.tools;

import lombok.extern.slf4j.Slf4j;

import java.util.UUID;

/**
 * <p>
 * UUID 工具类
 * </p>
 *
 * @author Gnerv LiGen
 */
@Slf4j
public class UUIDTools {

    private static final String DASH = "-";

    private UUIDTools() {
    }

    /**
     * 去中横线 小写
     *
     * @return uuid
     */
    public static String lower() {
        return UUID.randomUUID().toString();
    }

    public static String shortLower() {
        return UUID.randomUUID().toString().replace(DASH, "").toLowerCase();
    }

    /**
     * 去中横线 大写
     *
     * @return uuid
     */
    public static String upper() {
        return UUID.randomUUID().toString();
    }

    public static String shortUpper() {
        return UUID.randomUUID().toString().replace(DASH, "").toUpperCase();
    }

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            // "62d37ef5-d706-4f25-8e02-8603af7f3d65"
            String string = UUID.randomUUID().toString();
            System.out.print(string);
        }
    }

}
